//
//  InformationCell.m
//  时尚男士
//
//  Created by dlios on 15-6-6.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "InformationCell.h"

@implementation InformationCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.infoImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_infoImageView];
        [_infoImageView release];
        
        self.infoTitle = [[UILabel alloc] init];
        [self.contentView addSubview:_infoTitle];
        _infoTitle.font = [UIFont boldSystemFontOfSize:15.f];
        [_infoTitle release];
        _infoTitle.numberOfLines = 0;
        
        self.infoDigest = [[UILabel alloc] init];
        [self.contentView addSubview:_infoDigest];
        _infoDigest.font = [UIFont boldSystemFontOfSize:13.f];
        _infoDigest.textColor = [UIColor grayColor];
        [_infoDigest release];
        _infoDigest.numberOfLines = 0;
        self.contentView.backgroundColor = [UIColor clearColor];
        _infoDigest.backgroundColor = [UIColor clearColor];
        _infoTitle.backgroundColor = [UIColor clearColor];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat height = self.contentView.bounds.size.height;
    CGFloat width = self.contentView.bounds.size.width / 3;
    _infoImageView.frame = CGRectMake(0, 5, width, height - 10);
    _infoTitle.frame = CGRectMake(width + 10, 5, width * 2 - 10, height / 3 - 5);
    _infoDigest.frame = CGRectMake(width + 10, height / 3 , width * 2 - 10, height * 2 / 3 - 5);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
